package com.nil.codegen.controller;

import com.nil.codegen.base.BaseController;
import com.nil.codegen.bean.ResponseResult;
import com.nil.codegen.domain.dto.DataSourceDTO;
import com.nil.codegen.service.IDataSourceService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/datasource")
public class DataSourceController extends BaseController {

    @Resource
    private IDataSourceService dataSourceService;


    @PostMapping("/create")
    public ResponseResult create(@RequestBody DataSourceDTO dsDTO) {

        dataSourceService.create(dsDTO);
        return success("数据源创建成功");
    }





}
